/*
 * @Author: 李灿
 * @Date: 2020-11-06 16:35:46
 * @LastEditTime: 2021-07-28 18:37:52
 * @Description:闭包不是拿到了父级的作用域，而是复制了一份
 * @FilePath: /javascript/meetings/0.总结/7.js
 */
function fn() {
  var n = 9;
  function add() {
    n++;
  }
  return {
    n,
    add,
  };
}

var t1 = fn();
var t2 = fn();

t1.add();
console.log("t1.n", t1.n); // - 词法作用域

t2.add();
console.log("t2.n", t2.n);

var i = 0;

function name(params) {
  i++;
}

name();
console.log(i);
